Lecture 4: Random Walks
نویسندگان
چکیده
One of the most basic problems in computer science is that of deciding connectivity in graphs, i.e. S-T Connectivity: Given a directed graph G and two vertices s and t, is there a path from s to t in G? This problem can of course be solved in linear time using breadth-first or depth-first search. However , these algorithms also require linear space. It turns out that S-T Connectivity can in fact be solved using much less workspace. (When measuring the space complexity of algorithms, we do not count the space for the (read-only) input and (write-only) output.) Theorem 1 There is an algorithm deciding S-T Connectivity using space O(log 2 n) (and time n O(log n)). Proof: The following recursive algorithm IsPath(G, u, v, k) decides whether there is a path of length at most k from u to v. We can solve S-T Connectivity by running IsPath(G, s, t, n), where n is the number of vertices in the graph. The algorithm has log n levels of recursion and uses log n space per level of recursion (to store the vertex w), for a total space bound of log 2 n. Similarly, the algorithm uses polynomial time per level of recursion, for a total time bound of poly(n) log n = n O(log n). It is not known how to improve the space bound in Theorem 1 or to get the running time down to polynomial while maintaining space n o(1). For undirected graphs, however, we can do much better using a randomized algorithm. Specifically, we can place it in the following class:
منابع مشابه
Lecture 8: Random Walks in Undirected Graphs
We introduce the notion of a random walk in an undirected graph. What happens after we take T random steps in the walk? We show how to analyze walks and their convergence properties.
متن کاملLecture 6 : Random Walks versus Independent Sampling
For many problems it is necessary to draw samples from some distribution D on a typically large set V . In order to do so, one often considers a Markov chain on V whose limiting distribution is D. The efficiency of the sampling algorithm requires the Markov chain to converge quickly. Two famous examples where this approach have been applied successfully are approximation algorithms for the perm...
متن کاملRandom Walks & Trees
Preface These notes provide an elementary and self-contained introduction to branching random walks. Chapter 1 gives a brief overview of Galton–Watson trees, whereas Chapter 2 presents the classical law of large numbers for branching random walks. These two short chapters are not exactly indispensable, but they introduce the idea of using size-biased trees, thus giving motivations and an avant-...
متن کاملRandom Walks and Trees
These notes provide an elementary and self-contained introduction to branching random walks. Section 1 gives a brief overview of Galton–Watson trees, whereas Section 2 presents the classical law of large numbers for branching random walks. These two short sections are not exactly indispensable, but they introduce the idea of using size-biased trees, thus giving motivations and an avant-goût to ...
متن کامل